﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/QuizAdmin.Master" AutoEventWireup="true" CodeBehind="AddPosition.aspx.cs" Inherits="BladeTecWebApplication.Admin.AddPosition" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<script type="text/javascript">
$(function () {
	// Datepicker
	$('#datepicker').datepicker({
		inline: true
	});

});

function submitAddPosition() {
	if (Page_ClientValidate()) {
		$("#divRequired").hide();
	} else {
		$("#divRequired").show();
	}
	$("#MainContent_hireDate").val($("#datepicker").val());
}
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<span class="pageTitle">Add Position</span>
<br /><br />

	<asp:Panel ID="pnlPositionForm" runat="server">
		
		<div style="color: Red; display:none" id="divRequired">
		* Required<br /><br />
		</div>

		<table cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td>Position Title:<asp:RequiredFieldValidator ID="rf_title" runat="server"
						ErrorMessage="*" ControlToValidate="txtPositionTitle" ForeColor="Red"></asp:RequiredFieldValidator>
				</td>
				<td style="width:10px;">
				&nbsp;
				</td>
				<td>
					<asp:TextBox runat="server" ID="txtPositionTitle" CssClass="stdTextBox" Width="250px" />
				</td>
			</tr>
			<tr>
				<td colspan="3" style="height:5px;">&nbsp;</td>
			</tr>
			<tr>
				<td>Quiz:<asp:RequiredFieldValidator ID="rf_quiz" runat="server"
						ErrorMessage="*" ControlToValidate="ddlQuiz" ForeColor="Red"></asp:RequiredFieldValidator>
				</td>
				<td style="width:10px;">
				&nbsp;
				</td>
				<td>
					<asp:DropDownList ID="ddlQuiz" runat="server"></asp:DropDownList>
				</td>
			</tr>
			<tr>
				<td colspan="3" style="height:5px;">&nbsp;</td>
			</tr>
			<tr>
				<td valign="top">Desired Hire Date:
				</td>
				<td style="width:10px;">
				&nbsp;
				</td>
				<td>
					<div id="datepicker"></div><br />
					<asp:HiddenField ID="hireDate"
						runat="server" />
				</td>
			</tr>
			<tr>
				<td colspan="3" style="text-align:right; border-top: 1px solid #666;">
					<br />
					<asp:Button ID="btnAddPosition" runat="server" Text="Add" 
						onclientclick="submitAddPosition();" onclick="btnAddPosition_Click"/>
				</td>
			</tr>
		</table>

	</asp:Panel>

	<asp:Panel ID="pnlConfirmationForm" runat="server" Visible="false">
	
		The position <asp:Label runat="server" ID="lblTitle" Font-Bold="true"></asp:Label> for hire on <asp:Label ID="lblHireDate" runat="server" Font-Bold="true"></asp:Label>
		has been added.
		<br /><br />
		<a href="Position.aspx" class="dashboardLink">View Positions</a>

	</asp:Panel>

</asp:Content>
